Skip to content

Conversation

@nic-6443
Copy link
Member

@nic-6443 nic-6443 commented Jan 6, 2026

Background

In previous tests, the MCP Server was started using the following command:

pnpm dlx @modelcontextprotocol/[email protected]

However, during repeated test runs, this approach was found to cause unstable sub-dependency resolution. Different runs could resolve different versions of transitive dependencies, leading to MCP Server startup failures or inconsistent behavior, which negatively impacted test reliability.


Changes

To ensure stability and reproducibility of the test environment, this PR updates the build process for [email protected] as follows:

  1. Stop using pnpm dlx to dynamically fetch and execute the package
  2. Download the corresponding versioned source archive from the official repository:
    https://github.com/modelcontextprotocol/servers/archive/refs/tags/2025.7.1.tar.gz
  3. Manually build the [email protected] MCP Server using the included package-lock.json
  4. Lock the entire dependency tree to ensure consistent dependency versions across all test runs

Scope of Impact

  • Only affects the build and startup process of the MCP Server ([email protected])
  • No functional or behavioral changes to the server itself

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@LiteSun LiteSun marked this pull request as ready for review January 7, 2026 00:35
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Jan 7, 2026
@membphis
Copy link
Member

membphis commented Jan 8, 2026

@LiteSun still one test case failed, pls fix it

@LiteSun
Copy link
Member

LiteSun commented Jan 9, 2026

@LiteSun still one test case failed, pls fix it

done.

membphis
membphis previously approved these changes Jan 9, 2026
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have already extracted and copied package-lock.json from the archive package. Does this still need to be committed separately?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have already extracted and copied package-lock.json from the archive package. Does this still need to be committed separately?

Good catch. I didn’t notice before that there was already a lock file at the npm workspace level. It has been updated.

bzp2010
bzp2010 previously approved these changes Jan 9, 2026
membphis
membphis previously approved these changes Jan 12, 2026
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(
cd "${DEST_DIR}"
npm install
# Note: Although dlx specifies the package version, it does not use a lockfile,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, it is really important and useful information

SkyeYoung
SkyeYoung previously approved these changes Jan 12, 2026
bzp2010
bzp2010 previously approved these changes Jan 12, 2026
@LiteSun LiteSun dismissed stale reviews from bzp2010, SkyeYoung, and membphis via 71feaf7 January 13, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants